
import request from '@/utils/request'
import api from './config'
const host = api.apiHost

// 发票列表
export function getInvoiceList(params) {
  return request({
    url: host + '/invoice/list',
    method: 'get',
    params
  })
}

// 新增发票
export function saveInvoice(data) {
  return request({
    url: host + '/invoice/save',
    method: 'post',
    data
  })
}

// 新增发票
export function updateInvoice(data) {
  return request({
    url: host + '/invoice/update',
    method: 'post',
    data
  })
}

// 获取发票
export function getInvoice(params) {
  return request({
    url: host + '/invoice/detail',
    method: 'get',
    params
  })
}

// 删除发票
export function deleteInvoice(data) {
  return request({
    url: host + '/invoice/delete',
    method: 'post',
    data
  })
}
// invoiceStatusLine  /invoice/status
export function updateInvoiceStatus(data) {
  return request({
    url: host + '/invoice/status',
    method: 'post',
    data
  })
}
// // transferinvoice
// export function transferinvoice(data) {
//   return request({
//     url: host + '/invoice/transfer',
//     method: 'post',
//     data
//   })
// }

// // customer​/dropDown
// export function getinvoicesSelect(params) {
//   return request({
//     url: host + '/invoice/dropDown',
//     method: 'get',
//     params
//   })
// }

// /invoice/detailList
export function getDetailList(params) {
  return request({
    url: host + '/invoice/detailList',
    method: 'get',
    params
  })
}
